// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_hm_routes
// * CreateDate    : 2014-06-05 18:30:00
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:00
// * LastChanger   : 2014-06-05 18:30:00
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class HmRoutesEntity : EntityBase
    {
        public HmRoutesTable TableSchema
        {
            get
            {
                return HmRoutesTable.Current;
            }
		}
		
		public HmRoutesEntity()
        {

        }
		
		public HmRoutesEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Routeid = Convert.ToInt32(CommonFunctions.ToObject(dr["routeid"]));
			this.Routedomainname = Convert.ToString(CommonFunctions.ToObject(dr["routedomainname"]));
			this.Routedescription = Convert.ToString(CommonFunctions.ToObject(dr["routedescription"]));
			this.Routetargetsmthost = Convert.ToString(CommonFunctions.ToObject(dr["routetargetsmthost"]));
			this.Routetargetsmtport = Convert.ToInt32(CommonFunctions.ToObject(dr["routetargetsmtport"]));
			this.Routenooftries = Convert.ToInt32(CommonFunctions.ToObject(dr["routenooftries"]));
			this.Routeminutesbetweentry = Convert.ToInt32(CommonFunctions.ToObject(dr["routeminutesbetweentry"]));
			this.Routealladdresses = Convert.ToByte(CommonFunctions.ToObject(dr["routealladdresses"]));
			this.Routeuseauthentication = Convert.ToByte(CommonFunctions.ToObject(dr["routeuseauthentication"]));
			this.Routeauthenticationusername = Convert.ToString(CommonFunctions.ToObject(dr["routeauthenticationusername"]));
			this.Routeauthenticationpassword = Convert.ToString(CommonFunctions.ToObject(dr["routeauthenticationpassword"]));
			this.Routetreatsecurityaslocal = Convert.ToByte(CommonFunctions.ToObject(dr["routetreatsecurityaslocal"]));
			this.Routeusessl = Convert.ToByte(CommonFunctions.ToObject(dr["routeusessl"]));
			this.Routetreatsenderaslocaldomain = Convert.ToByte(CommonFunctions.ToObject(dr["routetreatsenderaslocaldomain"]));
        }
		
		public HmRoutesEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Routeid = Convert.ToInt32(CommonFunctions.ToObject(dr["routeid"]));
			this.Routedomainname = Convert.ToString(CommonFunctions.ToObject(dr["routedomainname"]));
			this.Routedescription = Convert.ToString(CommonFunctions.ToObject(dr["routedescription"]));
			this.Routetargetsmthost = Convert.ToString(CommonFunctions.ToObject(dr["routetargetsmthost"]));
			this.Routetargetsmtport = Convert.ToInt32(CommonFunctions.ToObject(dr["routetargetsmtport"]));
			this.Routenooftries = Convert.ToInt32(CommonFunctions.ToObject(dr["routenooftries"]));
			this.Routeminutesbetweentry = Convert.ToInt32(CommonFunctions.ToObject(dr["routeminutesbetweentry"]));
			this.Routealladdresses = Convert.ToByte(CommonFunctions.ToObject(dr["routealladdresses"]));
			this.Routeuseauthentication = Convert.ToByte(CommonFunctions.ToObject(dr["routeuseauthentication"]));
			this.Routeauthenticationusername = Convert.ToString(CommonFunctions.ToObject(dr["routeauthenticationusername"]));
			this.Routeauthenticationpassword = Convert.ToString(CommonFunctions.ToObject(dr["routeauthenticationpassword"]));
			this.Routetreatsecurityaslocal = Convert.ToByte(CommonFunctions.ToObject(dr["routetreatsecurityaslocal"]));
			this.Routeusessl = Convert.ToByte(CommonFunctions.ToObject(dr["routeusessl"]));
			this.Routetreatsenderaslocaldomain = Convert.ToByte(CommonFunctions.ToObject(dr["routetreatsenderaslocaldomain"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HmRoutesTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public int Routeid
        {
            get { return Convert.ToInt32(GetData(HmRoutesTable.C_routeid)); }
            set { SetData(HmRoutesTable.C_routeid, value); }
        }
		
        [DataMember]
        public string Routedomainname
        {
            get { return Convert.ToString(GetData(HmRoutesTable.C_routedomainname)); }
            set { SetData(HmRoutesTable.C_routedomainname, value); }
        }
		
        [DataMember]
        public string Routedescription
        {
            get { return Convert.ToString(GetData(HmRoutesTable.C_routedescription)); }
            set { SetData(HmRoutesTable.C_routedescription, value); }
        }
		
        [DataMember]
        public string Routetargetsmthost
        {
            get { return Convert.ToString(GetData(HmRoutesTable.C_routetargetsmthost)); }
            set { SetData(HmRoutesTable.C_routetargetsmthost, value); }
        }
		
        [DataMember]
        public int Routetargetsmtport
        {
            get { return Convert.ToInt32(GetData(HmRoutesTable.C_routetargetsmtport)); }
            set { SetData(HmRoutesTable.C_routetargetsmtport, value); }
        }
		
        [DataMember]
        public int Routenooftries
        {
            get { return Convert.ToInt32(GetData(HmRoutesTable.C_routenooftries)); }
            set { SetData(HmRoutesTable.C_routenooftries, value); }
        }
		
        [DataMember]
        public int Routeminutesbetweentry
        {
            get { return Convert.ToInt32(GetData(HmRoutesTable.C_routeminutesbetweentry)); }
            set { SetData(HmRoutesTable.C_routeminutesbetweentry, value); }
        }
		
        [DataMember]
        public byte Routealladdresses
        {
            get { return Convert.ToByte(GetData(HmRoutesTable.C_routealladdresses)); }
            set { SetData(HmRoutesTable.C_routealladdresses, value); }
        }
		
        [DataMember]
        public byte Routeuseauthentication
        {
            get { return Convert.ToByte(GetData(HmRoutesTable.C_routeuseauthentication)); }
            set { SetData(HmRoutesTable.C_routeuseauthentication, value); }
        }
		
        [DataMember]
        public string Routeauthenticationusername
        {
            get { return Convert.ToString(GetData(HmRoutesTable.C_routeauthenticationusername)); }
            set { SetData(HmRoutesTable.C_routeauthenticationusername, value); }
        }
		
        [DataMember]
        public string Routeauthenticationpassword
        {
            get { return Convert.ToString(GetData(HmRoutesTable.C_routeauthenticationpassword)); }
            set { SetData(HmRoutesTable.C_routeauthenticationpassword, value); }
        }
		
        [DataMember]
        public byte Routetreatsecurityaslocal
        {
            get { return Convert.ToByte(GetData(HmRoutesTable.C_routetreatsecurityaslocal)); }
            set { SetData(HmRoutesTable.C_routetreatsecurityaslocal, value); }
        }
		
        [DataMember]
        public byte Routeusessl
        {
            get { return Convert.ToByte(GetData(HmRoutesTable.C_routeusessl)); }
            set { SetData(HmRoutesTable.C_routeusessl, value); }
        }
		
        [DataMember]
        public byte Routetreatsenderaslocaldomain
        {
            get { return Convert.ToByte(GetData(HmRoutesTable.C_routetreatsenderaslocaldomain)); }
            set { SetData(HmRoutesTable.C_routetreatsenderaslocaldomain, value); }
        }
		
		#endregion
	}
	
	
}	

